}));
},
- popOut: function() {
+ popOut: function(animate) {
if (this.actor.row_count <= 1)
return false;
- Tweener.addTween(this._bannerLabel,
- { opacity: 0,
- time: ANIMATION_TIME,
- transition: 'easeOutQuad' });
+ if (animate)
+ Tweener.addTween(this._bannerLabel,
+ { opacity: 0,
+ time: ANIMATION_TIME,
+ transition: 'easeOutQuad' });
+ else
+ this._bannerLabel.opacity = 0;
+
return true;
},
- popIn: function() {
- if (this.actor.row_count <= 1)
- return false;
-
- Tweener.addTween(this._bannerLabel,
- { opacity: 255,
- time: ANIMATION_TIME,
- transition: 'easeOutQuad' });
- return true;
+ popInCompleted: function() {
+ this._bannerLabel.opacity = 255;
},
grabFocus: function(lockTray) {
_hideNotification: function() {
this._notification.ungrabFocus();
- this._notification.popIn();
if (this._reExpandNotificationId) {
this._notificationBin.disconnect(this._reExpandNotificationId);
this._notificationRemoved = false;
this._notificationBin.hide();
this._notificationBin.child = null;
+ this._notification.popInCompleted();
this._notification = null;
},
_expandNotification: function() {
- if (this._notification && this._notification.popOut()) {
+ if (this._notification && this._notification.popOut(true)) {
// Don't grab focus in urgent notifications that are auto-expanded.
if (!this._notification.urgent)
this._notification.grabFocus(false);
this._notificationQueue.splice(index, 1);
this._summaryNotificationBin.child = this._summaryNotification.actor;
- this._summaryNotification.popOut();
+ this._summaryNotification.popOut(false);
this._summaryNotification.grabFocus(true);
this._summaryNotificationBin.opacity = 0;
if (this._summaryState != State.SHOWN)
this._clickedSummaryItem = null;
this._summaryNotification.ungrabFocus();
- this._summaryNotification.popIn();
this._tween(this._summaryNotificationBin, '_summaryNotificationState', State.HIDDEN,
{ y: this.actor.height,
_hideSummaryNotificationCompleted: function() {
this._summaryNotificationBin.hide();
this._summaryNotificationBin.child = null;
+ this._summaryNotification.popInCompleted();
this._summaryNotification = null;
}
};